package cn.iocoder.yudao.module.cmt.dal.mysql.service;

import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.cmt.dal.dataobject.service.ServiceRequestDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.cmt.controller.admin.service.vo.*;

@Mapper
public interface ServiceRequestMapper extends BaseMapperX<ServiceRequestDO> {

    default PageResult<ServiceRequestDO> selectPage(ServiceRequestPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ServiceRequestDO>()
                .betweenIfPresent(ServiceRequestDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ServiceRequestDO::getId));
    }

}
